<?php
error_reporting(E_COMPILE_ERROR|E_ERROR|E_CORE_ERROR);
require('./roots.php');
require($root_path.'include/inc_environment_global.php');
/**
* CARE2X Integrated Hospital Information System Deployment 2.2 - 2006-07-10
* GNU General Public License
* Copyright 2002,2003,2004,2005,2006 Elpidio Latorilla
* elpidio@care2x.org, 
*
* See the file "copy_notice.txt" for the licence notice
*/
/*el archivo de lenguaje esta en su carpeta correspondiente de idioma y se llama lang_es_interconsulta.php (es en nuestro caso claro...*/
define('LANG_FILE','usuarios.php');
define('NO_2LEVEL_CHK',1);
require_once($root_path.'include/inc_front_chain_lang.php');
// reset all 2nd level lock cookies
require($root_path.'include/inc_2level_reset.php');

$thisfile=basename(__FILE__);
$breakfile=$root_path.'main/startframe.php'.URL_APPEND;
$_SESSION['sess_path_referer']=$top_dir.$thisfile;

$msj = $_GET['msj'];

# Start Smarty templating here
 /**
 * LOAD Smarty
 */

 # Note: it is advisable to load this after the inc_front_chain_lang.php so
 # that the smarty script can use the user configured template theme

 require_once($root_path.'gui/smarty_template/smarty_care.class.php');
 $smarty = new smarty_care('common');

 # Create a helper smarty object without reinitializing the GUI
 $smarty2 = new smarty_care('common', FALSE);

# Added for the common header top block

 $smarty->assign('sToolbarTitle',$LDUsuarios);

 # Added for the common header top block
 $smarty->assign('pbHelp',"javascript:gethelp('submenu1.php','$LDUsuarios')");

 $smarty->assign('breakfile',$breakfile);
 $smarty->assign('msj',$msj);

 # Window bar title
 $smarty->assign('title',$LDUsuarios);

 # Prepare the submenu icons

 $aSubMenuIcon=array(createComIcon($root_path,'post_discussion.gif','0'),
			createComIcon($root_path,'prescription.gif','0')
                    );

# Prepare the submenu item descriptions

$aSubMenuText=array($LDRegUsuarioTxt,
		    $LDBuscarUsuariosTxt,
		    );

# Prepare the submenu item links indexed by their template tags

$aSubMenuItem=array(
'LDRegUsuarioTxt' => '<a href="usuarios-pass.php'.URL_APPEND.'&target=reg">'.$LDRegUsuario.'</a>',
'LDBuscarUsuariosTxt' => '<a href="usuarios-pass.php'.URL_APPEND.'&target=buscar">'.$LDBuscarUsuarios.'</a>',
		    );

# Create the submenu rows

$iRunner = 0;

while(list($x,$v)=each($aSubMenuItem)){
	$sTemp='';
	ob_start();
		if($cfg['icons'] != 'no_icon') $smarty2->assign('sIconImg','<img '.$aSubMenuIcon[$iRunner].'>');
		$smarty2->assign('sSubMenuItem',$v);
		$smarty2->assign('sSubMenuText',$aSubMenuText[$iRunner]);
		$smarty2->display('common/submenu_row.tpl');
 		$sTemp = ob_get_contents();
 	ob_end_clean();
	$iRunner++;
	$smarty->assign($x,$sTemp);
}

# Assign the submenu to the mainframe center block

 $smarty->assign('sMainBlockIncludeFile','usuarios/submenu_usuarios.tpl');

 /**
 * show Template
 */

 $smarty->display('common/mainframe.tpl');

?>
